
type RequiredByKeys<T, K = keyof T> = Expand<{
    [P in Exclude<keyof T, K>]?: T[P]
} & {
    [P in Extract<keyof T, K>]: Exclude<T[P], undefined>
}>

// 需要注意：转化时要将可选类型的值的undefined去掉！！！